home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
sys
/
DVC.lha
/
DVC
/
Plugins
/
DVC.rexx
next >
Wrap
OS/2 REXX Batch file
|
1997-07-24
|
2KB
|
70 lines
/* $VER: DVC.rexx 1.2 (24.7.1997) #REXX © Msi Software
*
* This script get the browser file & screen,
* and get the correct browser address for use with sys:rexxc/rx
* Then DVC is started with the RX option,
* a string that holds the rexxaddress and browser command.
* Currently this script support AWeb/Voyager/IBrowse,
* but can easily be adapted for other browsers that use REXX.
* Perhaps even for use with non-WWW programs like FTP etc.
*
* (The URL's in DVC's Type 2 lists may be HTTP, FTP, etc, etc.)
*/
/* Allow use of result strings */
options results
/* Get a list of the current ports */
ports=show('P')||' '
/* Get the arguments */
parse arg cmds
parse var cmds file screen
IF pos('AWEB',ports)>0 THEN
DO
/* Get the active AWeb port */
parse var ports dummy 'AWEB.' portnr .
address value 'AWEB.'||portnr
'GET ACTIVEPORT'
awebhost=result
/* Get screenname if no screenname was given */
if screen='' then do
'GET SCREEN'
screen=RESULT
end
/* Set the browser port and command for AWeb */
browsercmd=awebhost' Open'
END
ELSE
IF pos('MINDWALKER',ports)>0 THEN
/* Set the string for Voyager */
browsercmd='MINDWALKER OpenURL'
ELSE
IF pos('VOYAGER',ports)>0 THEN
/* Set the string for Voyager */
browsercmd='VOYAGER OpenURL'
ELSE
IF pos('IBROWSE',ports)>0 THEN
/* Set the string for IBrowse */
browsercmd='IBROWSE GotoURL'
ELSE
/* Browser not running, or not supported */
exit
/* As you can see, only 'BrowserPort BrowserCommand' is needed, */
/* DVC will later append the download url to the end of the browsercmd */
/* and send that string to sys:rexxc/rx */
/* Strip spaces and quotation marks in front and behind of strings, */
/* this is needed since the script (and DVC) later add "" marks. */
file=strip(file,'B',' ')
screen=strip(screen,'B',' ')
file=strip(file,'B','"')
screen=strip(screen,'B','"')
/* Start DVC */
address command 'DVC 'file' LIST PUB="'screen'" RX="'browsercmd'"'
exit